<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="./lib/element-ui.min.css" />
</head>
<body>
<div class="agentDraft" id="agentDraft">
    <div >
        <el-button @click="goBack" type="text" icon="el-icon-back">返回</el-button>
    </div>
  <img src="./img/header/drafTop.png" style="width: 100%" alt="Logo"  class="logo">
  <img src="./img/header/drafBottom.png" style="height: 600px" alt="Logo" id="agentImage2" class="logo">
</div>
<script type="text/javascript" src="./lib/vue.min.js"></script>
<script type="text/javascript" src="./lib/element-ui.min.js"></script>
<script type="text/javascript">



  const vm = new Vue({ // 配置对象 options
    el: '#agentDraft',
    data() {
      return {
        loading: false
      }
    },
    mounted() {

      document.addEventListener('DOMContentLoaded', function() {
        // 获取触发元素
        const agentTrigger = document.getElementById('agentImage2');
        const contentFrame = parent.document.getElementById('content-frame');
        // 添加点击事件监听器
        agentTrigger.addEventListener('click', function(e) {
          e.preventDefault();
          // 更改 iframe 的 src 属性以加载 agent.html
          contentFrame.src = 'agentDetail.html';
        });
      });

    },
    methods: {
        goBack(){
            console.log('go back');
            const contentFrame = parent.document.getElementById('content-frame');
            contentFrame.src = 'agent.html';
        }
    }

  })


</script>
</body>
</html>
